This topic describes how to use the mutator functions to create and modify XXDM instances from within XQuery and XQuery Scripting Extensions (XQSE) programs.
Identify the element you need to change and promote the element to an unmodified changed-element using the changed-element() function.
For example, the following call declares $co to be an unmodified changed-element of type orders for the element represented by $o.
declare $co as changed-element(orders) := changed-element($o);
Modify the changed-element using the mutator functions.
To insert a node into an XXDM instance (changed-element) at a specified XPath location, use the fn-bea:insert-into() function.
To delete a node at a specified XPath location in an XXDM instance, use the fn-bea:delete() function.
To replace the value of a node in an XXDM instance at a specified XPath location, use the fn-bea:replace-value() function.
See Mutator Functions for a detailed description of each of the mutator functions.